# import java
# class {"java":}
# exec {"echo $(pwd)"}
# exec { "puppet:///modules/load-paas-exec.rb":}
create_resource  :file, ["/opt", "/opt/miniPaaS/", "/opt/miniPaaS/loadtest"], :ensure => "directory"
file ["/opt/miniPaaS/loadtest/rbe.jar"], :source => "puppet://modules/loadtest/rbe.jar"
file ["/opt/miniPaaS/loadtest/load-paas-exec.rb"], :source => "puppet://modules/loadtest/load-paas-exec.rb"
# create_resource(:exec, "load-paas-exec.rb rbe1.properties", :path => "/opt/miniPaaS/loadtest") 
log_file = "#{Time.now.gmtime.inspect.gsub(/\ /,"-")}.log"
puts "log file: /root/loadtest/log/#{log_file}"

%x{"cd /opt/miniPaaS/loadtest/;
	load-paas-exec.rb rbe1.properties;}
	

%x{cd /opt/miniPaaS/loadtest/;
	exec -a loadtester1 load-paas-exec.rb;
	nohup java -cp rbe.jar generalRBE.RBEGeneral > log/#{log_file} &}
